package com.softer.wxzj.controller;

import com.github.pagehelper.PageInfo;
import com.softer.wxzj.common.entity.Page;
import com.softer.wxzj.entity.PayInTransitAudit;
import com.softer.wxzj.entity.ProjectInTransitAudit;
import com.softer.wxzj.service.InTransitAuditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 在途审核查询
 *
 * @author Gong Zhiyang
 * @date 2019/8/13
 */
@RestController
@RequestMapping("/inTransitAudit")
public class InTransitAuditController {
    @Autowired
    private InTransitAuditService inTransitAuditService;

    /**
     * 获取项目在途审核列表
     *
     * @param page                  分页实体
     * @param projectInTransitAudit 查询实体
     * @return 列表
     */
    @PostMapping("/getProjectInTransitAudit")
    public PageInfo<ProjectInTransitAudit> getProjectInTransitAudit(Page page, ProjectInTransitAudit projectInTransitAudit) {
        return inTransitAuditService.getProjectInTransitAudit(page, projectInTransitAudit);
    }

    /**
     * 获取拨款申请在途审核列表
     *
     * @param page              分页实体
     * @param payInTransitAudit 查询实体
     * @return 列表
     */
    @PostMapping("/getPayInTransitAudit")
    public PageInfo<PayInTransitAudit> getPayInTransitAudit(Page page, PayInTransitAudit payInTransitAudit) {
        return inTransitAuditService.getPayInTransitAudit(page, payInTransitAudit);
    }
}
